<template>
  <div class="page-header">
    <slot name="left"></slot>
    <!-- <span class="header-search">
      <i class="iconfont icon-search"></i>
    </span> -->
    <span class="header-title">{{ title }}</span>
    <!-- <span class="header-title">昌平区北七家宏福科技园(337省道北)</span> -->
    <slot name="right"></slot>
    <!-- <span class="header-login">登录 | 注册</span> -->
  </div>
</template>

<script>
export default {
  name: "HeaderTop",
  props: {
    title: String,
  },
}
</script>

<style lang="less">
@import "../../common/style/mixin.less";
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-width: 320px;
  max-width: 750px;
  height: 4.5rem;
  padding: 0 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  line-height: 4.5rem;
  background-color: @theme-color;
  color: #fff;
  .header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 18rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.8rem;
  }

  .header-search {
    i {
      font-size: 2.3rem;
      color: #fff;
    }
  }
  .header-login {
    font-size: 1.4rem;
    color: #fff;
  }
}
</style>
